This guide shows how to create a crontab file and how to set up specific commands to run at specific times using the Linux crontab command. ... You can either use the su command to switch to the root user or the sudo command to run the crontab command.